<%@ include file="database_ini.jsp"%>
<%@page contentType="text/html; charset=UTF-8"%>
  <%@page import="org.json.*"%>
  <%

	System.out.println("started:.....");
	
	System.out.println(request.getParameter("dropid"));
	
	
	String sql = "select * from a";	
	pstmt = conn.prepareStatement(sql);
	//pstmt.setString(1 , listname);
	
	ResultSet rs = pstmt.executeQuery();
	JSONObject obj=new JSONObject();
	
	/****************/
	JSONArray jsonChildarray = new JSONArray();
	
	while(rs.next()){
		
		String B = rs.getString("B");
		String C = rs.getString("C");
		JSONObject child = new JSONObject();
		child.put("B", B);
		child.put("C", C);
		System.out.println(B + C);
		jsonChildarray.put(child);
		
	}


    obj.put("jsonChildarray", jsonChildarray);
    /****************/
    
    /****************
    obj.put("name","foo");
    obj.put("num",new Integer(100));
    obj.put("balance",new Double(1000.21));
    obj.put("is_vip",new Boolean(true));
    /****************/
    
    
    out.print(obj);
    System.out.println(obj);
    out.flush();
    
    conn.close();
  %>